package wox.lonice.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import wox.lonice.service.UserService;

@Controller
public class UserController {

	@Autowired
	private UserService userService;
	
	@RequestMapping("/test/user")
	@ResponseBody
	public String useUservice(){
		
		return "hello word";
	}
	
	@RequestMapping("/test/hello")
	@ResponseBody
	public String hello(){
		return "你好";
	}
	
	@RequestMapping("/test/error")
	@ResponseBody
	public String error() throws Exception{
		throw new Exception("抛出异常");
	}
	
	@RequestMapping("/test/index")
	public String index(){
		
		return "index";
	}
	
}
